package o;

import com.huawei.appgallery.agwebview.api.ui.IWebViewActivityProtocol;
import com.huawei.appgallery.assistantdock.base.externalaction.openviewaction.RemoteBuoyAction;
import com.huawei.appmarket.service.activitydispatcher.OpenGateway.Param;
import com.huawei.appmarket.service.activitydispatcher.OpenGateway.d;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class eng extends d {
    private static Set<String> ॱ = new HashSet();

    static {
        ॱ.add("external_webview");
        ॱ.add("internal_webview");
        ॱ.add("user_privacy_webview");
        ॱ.add("buoy_webview");
        ॱ.add("product_purchase_webview");
    }

    public boolean ˋ(List<Param> list) {
        if (list == null || list.size() == 0) {
            return false;
        }
        for (Param param : list) {
            if (param != null && RemoteBuoyAction.REMOTE_BUOY_URI.equals(param.ˋ())) {
                boolean contains = ॱ.contains(param.ˏ());
                if (!contains) {
                    Logger.ˋ("WebViewActivityParamFetcher", "error uri:" + param.ˏ());
                }
                return contains;
            }
        }
        return false;
    }

    public fjb ˏ(List<Param> list) {
        if (list == null) {
            return null;
        }
        String str = null;
        String str2 = null;
        for (Param param : list) {
            if (param != null) {
                if (RemoteBuoyAction.REMOTE_BUOY_URI.equals(param.ˋ())) {
                    str2 = param.ˏ();
                } else if ("url".equals(param.ˋ())) {
                    str = param.ˏ();
                }
            }
        }
        fjb ˎ = fho.ˏ().ˋ("AGWebView").ˎ("webview_activity");
        if (ˎ == null) {
            return null;
        }
        IWebViewActivityProtocol iWebViewActivityProtocol = (IWebViewActivityProtocol) ˎ.ˊ();
        iWebViewActivityProtocol.setUri(str2);
        iWebViewActivityProtocol.setUrl(str);
        return ˎ;
    }
}
